﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.Serialization;

namespace MishraReader.Entities
{
    [DataContract]
    [DebuggerDisplay("Count = {_items.Count}")]
    public class ItemsList
    {
        // This ctor is not used by the data contract serializer
        // It's for testing
        public ItemsList(IEnumerable<Item> items, string token = null)
        {
            ContinuationToken = token;
            _items = new List<Item>(items);
        }

        [DataMember(Name = "continuation")]
        public String ContinuationToken { get; set; }

        [DataMember(Name = "items")]
        private List<Item> _items;
        
        public IEnumerable<Item> Items
        {
            get { return _items; }
        }
    }
}